<template>
	<view>
		<my-bar>
			<block slot="content">找回密码</block>
		</my-bar>
		<form>
			<view class="cu-form-group margin-top-sm">
				<view class="title">邮箱：</view>
				<input placeholder="请输入邮箱" name="input"></input>
			</view>
			<view class="padding flex flex-direction">
				<button class="cu-btn bg-green lg">提交</button>
			</view>

		</form>
	</view>
</template>
 
<script>
	import service from '../../common/service.js';
	import mInput from '../../components/m-input.vue';

	export default {
		components: {
			mInput
		},
		data() {
			return {
				email: ''
			}
		},
		methods: {
			findPassword() {
				/**
				 * 仅做示例
				 */
				if (this.email.length < 3 || !~this.email.indexOf('@')) {
					uni.showToast({
						icon: 'none',
						title: '邮箱地址不合法',
					});
					return;
				}
				uni.showToast({
					icon: 'none',
					title: '已发送重置邮件至注册邮箱，请注意查收。',
					duration: 3000
				});
			}
		}
	}
</script>

<style>

</style>
